<include file="Common/header" />
<!-- 顶部 -->     
<div id="middle">
    <include file="Common/menu" />
    <div class="right" id="mainFrame">
		<div class="right_cont">
			<ul class="breadcrumb">当前位置：
				<a href="javascript:void(0);">首页</a> <span class="divider">/</span>
				<a href="javascript:void(0);">会员管理</a> <span class="divider">/</span>
				添加会员
			</ul>
			<div class="title_right"><strong>基本信息</strong></div>
			<form action="" method="POST" id="addfrom">
				<div style="width: 900px; margin:auto">
					<table class="table table-bordered">
						<tr>
							<td width="20%" align="right" bgcolor="#f1f1f1">客人姓名：</td>
							<td>
								<input type="hidden" name="member_id" id="member_id" value="{$userinfo['member_id']}" />
								<input type="text" name="member_nick" id="member_nick" class="span1-3" value="{$userinfo['member_nick']}" />
								<span class="usernameabel"></span>
							</td>
						</tr>
						<tr>
							<td width="20%" align="right" bgcolor="#f1f1f1">身份证：</td>
							<td>
								<input type="text" name="member_card" id="member_card" class="span1-3" value="{$userinfo['member_card']}" />
								<span class="passwordabel"></span>
							</td>
						</tr>
						<tr>
							<td width="20%" align="right" bgcolor="#f1f1f1">联系方式：</td>
							<td>
								<input type="text" name="member_phone" id="member_phone" class="span1-3" value="{$userinfo['member_phone']}" />
								<span class="nicknameabel"></span>
							</td>
						</tr>
						<tr>
							<td width="20%" align="right" bgcolor="#f1f1f1">房间号：</td>
							<td>
								<input type="text" name="room_number" id="room_number" class="span1-3" value="{$userinfo['room_number']}" />
								<span class="nicknameabel"></span>
							</td>
						</tr>
						<tr>
							<td width="20%" align="right" bgcolor="#f1f1f1">入住时间：</td>
							<td>
								<input type="text" name="checkin_time" id="checkin_time" class="laydate-icon span1-3" value="<?php echo $userinfo['member_id'] ? date('Y-m-d H:i', $userinfo['checkin_time']) : '';?>" />
								<span class="nicknameabel"></span>
							</td>
						</tr>
						<tr>
							<td width="20%" align="right" bgcolor="#f1f1f1">离开时间：</td>
							<td>
								<input type="text" name="leaving_time" id="leaving_time" class="laydate-icon span1-3" value="<?php echo $userinfo['member_id'] ? date('Y-m-d H:i', $userinfo['leaving_time']) : '';?>" />
								<span class="nicknameabel"></span>
							</td>
						</tr>
						
						<tr>
							<td width="20%" align="right" bgcolor="#f1f1f1">租房类型：</td>
							<td>
								<input type="text" name="type" id="type" class="span1-3" value="" />
								<span class="nicknameabel"></span>
							</td>
						</tr>
						<tr>
							<td width="20%" align="right" bgcolor="#f1f1f1">楼层：</td>
							<td>
								<input type="text" name="floor" id="floor" class="span1-3" value="" />
								<span class="nicknameabel"></span>
							</td>
						</tr>
						<tr>
							<td width="20%" align="right" bgcolor="#f1f1f1">房型：</td>
							<td>
								<input type="text" name="roomtype" id="roomtype" class="span1-3" value="" />
								<span class="nicknameabel"></span>
							</td>
						</tr>
					</table>
					
					<table  class="margin-bottom-20 table  no-border" >
						<tr>
							<td class="text-center">
								<input type="button" value="确定" class="btn btn-info roleSubmit" style="width:80px;" />
							</td>
						</tr>
					</table>
				</div>
			</form>
		</div>     
    </div>
</div>
<script>
	$(document).ready(function(){
		$(".roleSubmit").on('click', function(){
			if($("#checkin_time").val() == ""){
				alert("请选择入驻时间");
				return false;
			}
			
			if($("#leaving_time").val() == ""){
				alert("请选择离开时间");
				return false;
			}
			
			$.post('add.html', $("#addfrom").serialize(), function(data){
				alert(data);
			});
		});
	});
</script>
<script>
	!function(){
		laydate.skin('molv');
		laydate({elem: '#checkin_time', format: "YYYY-MM-DD hh:mm:ss"});
		laydate({elem: '#leaving_time', format: "YYYY-MM-DD hh:mm:ss"});
	}();
</script>
<include file="Common/footer" />
